import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from "typeorm";
@Entity()
export class Novel{
    @PrimaryGeneratedColumn()
    id: number;
    @Column() title: string;
    @Column() author: string;
    @Column() description: string;
    @Column({name: 'cover_img_url'}) coverImgUrl: string;
    category: number;
    @Column() status: number
    @Column({name: 'is_delete'}) isDelete: boolean
}
@Entity()
export class Chapter{
    @PrimaryGeneratedColumn()
    id: number;
    @Column({name: 'novel_id'}) novelId: number;
    @Column() order: number;
    @Column() title: string;
    @CreateDateColumn({name: 'create_date'}) createDate: number;  
    @Column({name: 'is_delete'}) isDelete: boolean
    @Column({name: 'is_vip'}) isVip: boolean
}
@Entity("chapter_content")
export class ChapterContent{
    @PrimaryGeneratedColumn()
    id: number;
    @Column() content: string;
}
@Entity()
export class Comment{
    @PrimaryGeneratedColumn()
    id: number;
    @Column() userId: string;
    @Column() chapterId: number;
    @Column() content: string;
    @CreateDateColumn() createDate: number;
}
